package com.dt.app.api.test.mapper;

import com.dt.app.modules.test.entities.SchoolCourseSelection;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dt.app.modules.test.vo.SchoolCourseSelectionCount;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 鸿源塔基
 * @since 2024-02-22
 */
@Mapper
public interface SchoolCourseSelectionMapper extends BaseMapper<SchoolCourseSelection> {

    @Select("select course,grade,count(*) as slYx from school_course_selection group by grade,course")
    public List<SchoolCourseSelectionCount> getCounts();
}
